import request from '@/utils/request'

export const getShopAllTypes = () => 
request({
    url: '/type/types',
    method: 'get'
})


export const addType = (data:any) => 
request({
    url: '/type/setType',
    method: 'post',
    data
})

export const deleteType = (id:number) => 
request({
    url: `/type/setType/${id}`,
    method: 'delete'
})

export const updateType = (data:any) => 
request({
    url: '/type/setType',
    method: 'put',
    data
})